package com.pzb.page.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pzb.page.mapper.PgPageItemGroupbuyingMapper;
import com.pzb.page.domain.PgPageItemGroupbuying;
import com.pzb.page.service.IPgPageItemGroupbuyingService;

/**
 * 拼团活动Service业务层处理
 * 
 * @author Mr_Wu
 * @date 2021-12-22
 */
@Service
public class PgPageItemGroupbuyingServiceImpl implements IPgPageItemGroupbuyingService 
{
    @Autowired
    private PgPageItemGroupbuyingMapper pgPageItemGroupbuyingMapper;

    /**
     * 查询拼团活动
     *
     * @param itemId 拼团活动主键
     * @return 拼团活动
     */
    @Override
    public PgPageItemGroupbuying selectPgPageItemGroupbuyingByItemId(Long itemId)
    {
        return pgPageItemGroupbuyingMapper.selectPgPageItemGroupbuyingByItemId(itemId);
    }

    /**
     * 新增拼团活动
     *
     * @param pgPageItemGroupbuying 拼团活动
     * @return 结果
     */
    @Override
    public int insertPgPageItemGroupbuying(PgPageItemGroupbuying pgPageItemGroupbuying)
    {
        return pgPageItemGroupbuyingMapper.insertPgPageItemGroupbuying(pgPageItemGroupbuying);
    }

    /**
     * 删除拼团活动信息
     *
     * @param itemId 拼团活动主键
     * @return 结果
     */
    @Override
    public int deletePgPageItemGroupbuyingByItemId(Long itemId)
    {
        return pgPageItemGroupbuyingMapper.deletePgPageItemGroupbuyingByItemId(itemId);
    }
}
